package cn.com.dhcc.turbo.entity.exch;

import java.io.Serializable;

/**
 * 消息对象包裹类
 */
public class QueueMsgWrapper implements Serializable{
	private static final long serialVersionUID = 1L;
	private String queueName; //采用的队列名称
	private ExchageLifecycle exchageLifecycle; //数据对应的生命周期
	private Object data;    //数据

	public String getQueueName() {
		return queueName;
	}

	public ExchageLifecycle getExchageLifecycle() {
		return exchageLifecycle;
	}

	public Object getData() {
		return data;
	}

	public void setQueueName(String queueName) {
		this.queueName = queueName;
	}

	public void setExchageLifecycle(ExchageLifecycle exchageLifecycle) {
		this.exchageLifecycle = exchageLifecycle;
	}

	public void setData(Object data) {
		this.data = data;
	}

	@Override
	public String toString() {
		return "QueueMsgWrapper [queueName=" + queueName + ", exchageLifecycle=" + exchageLifecycle + ", data=" + data
				+ "]";
	}

	/**
	 * 队列类型
	 */
	public static enum ExchageLifecycle {
		remoteStore("0", "数据发送给接收节点"), 
		feedbackSendStatusAndRoutelog("1", "数据发送状态和路由状态反馈给发送节点"), 
		feedbackSendStatusAndRoutelogToTmp("2", "数据发送状态和路由状态反馈给路由节点"),
		feedbackNotifyStatusAndRoutelog("3","数据通知状态和路由状态反馈给接收节点"),
		feedbackNotifyStatusAndRoutelogTmp("4","数据通知状态和路由状态反馈给接收节点"),
		remoteStoreTmp("6", "内网接收节点"), 
		gapEntrepot("5", "数据发送给网闸节点");
		
		private String type;
		private String desc;

		private ExchageLifecycle(String type, String desc) {
			this.type = type;
			this.desc = desc;
		}

		public String getType() {
			return type;
		}

		public String getDesc() {
			return desc;
		}

		public void setType(String type) {
			this.type = type;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}

		public String value() {
			return this.type;
		}

		@Override
		public String toString() {
			return type;
		}
	}
}
